/*
 * Camera.cpp
 *
 *  Created on: 2009/01/20
 *      Author: JP10161
 */

#include "Camera.h"

const Vector3D Camera::_DEFAULT_EYE = Vector3D(0.f, 0.f, 1.f);
const Vector3D Camera::_DEFAULT_LOOKAT = Vector3D(0.f, 0.f, 0.f);
const Vector3D Camera::_DEFAULT_UP = Vector3D(0.f, 1.f, 0.f);

const float Camera::_DEFAULT_FIELD_OF_VIEW 	= 45.0f;
const float Camera::_DEFAULT_NEAR_CLIP		= 0.1f;
const float Camera::_DEFAULT_FAR_CLIP		= 128.0f;

Camera::Camera(Vector3D eye, Vector3D lookat, Vector3D up)
{
	// TODO Auto-generated constructor stub
	mEye = eye;
	mLookat = lookat;
	mUp = up;

	mScale = Vector2D(1.f, 1.f);
}

Camera::~Camera()
{
	// TODO Auto-generated destructor stub
}

void Camera::setPosition(const Vector3D& pos)
{
	mPosition = pos;

	mEye += mPosition;
	mLookat += mPosition;
}
